import React from 'react';
import {Button,Select,DatePicker,Table,Message} from 'antd';
let accountRecharge = React.createClass({
    getInitialState(){
      return{
        state:true,
        amount:1000000,
        rest:100000,
        type:'0',
        dateRange:[],
      };
    },
    componentDidMount(){
      this.setState({
      });
    },
    submit(){
      let now = new Date();
      let data = {
        startTime:this.state.dateRange[0]||now.toLocaleDateString(),
        endTime:this.state.dateRange[1]||now.toLocaleDateString(),
        paymentState:this.state.type
      };
      Utils.sendAjax({
        url:'/cash/findList',
        data:JSON.stringify(data),
        callback:function(result){
          if(result.code=='200'){
            Message.success(result.message);
          }
        }
      });
    },
    typeChange(value){
      this.setState({
        type:value
      });
    },
    dateChange(date,dateString){
      this.setState({
        dateRange:dateString
      });
    },
    back(){
      history.back();
    },
    render(){
      const Option = Select.Option;
      const RangePicker = DatePicker.RangePicker;
      const Columns =[ {
         title:'交易类型',
         dataIndex:'dealType',
         key:'dealType'
      },{
        title:'交易账户',
        dataIndex:'amount',
        key:'amount'
      },{
        title:'交易时间',
        dataIndex:'bankName',
        key:'bankName'
      },{
        title:'充值金额',
        dataIndex:'bankNo',
        key:'bankNo'
      }];
      const data = [{
        key:'1',
        dealType:'充值',
        amount:'增值账户',
        bankName:'2016-12-13~2016-12-19',
        bankNo:'8000',
      }];
      return (
        <div>
          <p style={{padding: '1rem 2rem',fontSize:'1rem'}}><span style={{lineHeight:'4rem'}}>温馨提示：</span><br/>
            目前暂不支持线上充值，请联系爱租派管理员进行充值<br/>
            官方电话：0571-82813040<br/>
            工作时间：周一至周日 9:00-21:00<br/>
        </p>
        <Button style={{margin: '2rem 2rem 11rem 2rem',width:'10rem'}} onClick={this.back}>返回</Button>
        </div>
      )
    }
});

export default accountRecharge;
